[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
IMUL Integer Multiply, Signed Flags: O D I T S Z A P C
* ? ? ? ? *
IMUL source
Logic: AX . AL * source ; if source is a byte
or
DX:AX . AX * source ; if source is a word
IMUL performs signed multiplication. If source is a byte, IMUL
multiplies source by AL, returning the product in AX. If source is a
word, IMUL multiplies source by AX, returning the product in DX:AX.
The Carry Flag and Overflow Flag are set if the upper half of the
result (AH for a byte source, DX for a word source) contains any
significant digits of the product, otherwise they are cleared.
The 80386 can handle 64-bit multiplications in the same way, but uses the
EDX:EAX register pair.
Starting with the 80186, IMUL has two additional uses that allow for 16-
bit results:
IMUL register16, immediate16
In this form, register16 is multiplied by immediate16, and the
result placed in register16. The other form looks like this:
IMUL register16, memory16, immediate16
Here, memory16 is multiplied by immediate16, and the result is
placed in register16.
In both these forms, the carry and overflow flags will be set if the
result is too large to fit into 16 bits.
--------------------------------------------------------------------------
Operands Clocks Transfers Bytes Example
reg8 80-98 - 2 IMUL CL
reg16 128-154 - 2 IMUL BX
mem8 (86-104) + EA 1 2-4 IMUL BITE
mem16 (138-164) + EA 1 2-4 IMUL WORD[BP][DI]
--------------------------------------------------------------------------
See Also:
MUL
AAM
EA
Flags
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson